package com.yycx.msg.provider.websocket;

import lombok.Data;

import javax.websocket.Session;
import java.io.Serializable;

/**
 * @author zyf
 */
@Data
public class WebSocketEntity {

    /**
     * 用户id
     */
    private String userId;

    private Session session;

    /**
     * 消息类型
     */
    private String sendType;

    /**
     * 记录下次发送时间的时间戳
     */
    private long timeStr;

    /**
     * 是否收到了心跳
     */
    private boolean isHeart = false;


    public WebSocketEntity(String userId, String sendType, Session session) {
        super();
        this.userId = userId;
        this.session = session;
        this.sendType=sendType;
    }

    public WebSocketEntity(String userId, Session session) {
        super();
        this.userId = userId;
        this.session = session;
    }


}